home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 001-010 / amok01 / fish / fishstart.mod < prev    next >
Text File  |  1993-11-04  |  2KB  |  91 lines

  1. IMPLEMENTATION MODULE FishStart;
  2.  
  3. FROM SYSTEM IMPORT ADDRESS,ADR;
  4. FROM Intuition IMPORT NewScreen,NewWindow,ScreenPtr,WindowPtr,IDCMPFlagSet,
  5.        WindowFlagSet,OpenScreen,CloseScreen,OpenWindow,CloseWindow,
  6.        customScreen,ViewAddress,IDCMPFlags,WindowFlags,
  7.        ScreenFlags,ScreenFlagSet;
  8. FROM Graphics IMPORT ViewPtr,BitMapPtr,ViewPortPtr,RastPortPtr,ViewModes,
  9.        ViewModeSet;
  10.  
  11. CONST
  12.   DEPTH = 3;
  13.  
  14. (*
  15. VAR
  16.   myscreen : ScreenPtr;
  17.   window   : WindowPtr;
  18.   rp       : RastPortPtr;
  19.   vp       : ViewPortPtr;
  20.   view     : ViewPtr;
  21. *)
  22.  
  23. PROCEDURE startgfx(x,y,Height,Width,nbitPlaness: INTEGER;
  24.                    palette: ADDRESS; s: ADDRESS;
  25.                    Flags: WindowFlagSet; sbitmap: BitMapPtr);
  26.  
  27. VAR
  28. (*  i,j      : register; ??? *)
  29.   idcmp    : IDCMPFlagSet;
  30.   nw       : NewWindow;
  31.   ns       : NewScreen;
  32.  
  33. BEGIN
  34.   (* intuition direct comunication message port *)
  35.   idcmp := IDCMPFlagSet{closeWindow,refreshWindow};
  36.  
  37.   WITH ns DO
  38.     leftEdge := 0;
  39.     topEdge := 0;
  40.     width := 320;
  41.     height := 200;
  42.     depth := DEPTH;
  43.     detailPen := 255;
  44.     blockPen := 255;
  45.     viewModes := ViewModeSet{};
  46.     type := customScreen;
  47.     font := NIL;
  48.     defaultTitle := NIL;
  49.     gadgets := NIL;
  50.   END;
  51.  
  52.   myscreen := OpenScreen(ns);
  53.   IF myscreen = NIL THEN HALT END;
  54.  
  55.   WITH nw DO
  56.     leftEdge := x;
  57.     topEdge := y;
  58.     width := Width;
  59.     height := Height;
  60.     detailPen := 255;
  61.     blockPen := 255;
  62.     idcmpFlags := idcmp;
  63.     flags := WindowFlagSet{windowDepth,windowSizing,windowDrag,windowClose} + Flags;
  64.     firstGadget := NIL;
  65.     checkMark := NIL;
  66.     title := s;
  67.     screen := NIL;
  68.     bitMap := sbitmap;
  69.     minWidth := 80;
  70.     minHeight := 16;
  71.     maxWidth := 640;
  72.     maxHeight := 200;
  73.     type := ScreenFlagSet{wbenchScreen};
  74.   END;
  75.  
  76.   window := OpenWindow(nw);
  77.   view := ViewAddress();
  78.   rp := ADR(myscreen^.rastPort);
  79.   vp := ADR(myscreen^.viewPort);
  80. END startgfx;
  81.  
  82. PROCEDURE endgfx();
  83.  
  84. BEGIN
  85.   CloseWindow(window);
  86.   CloseScreen(myscreen);
  87. END endgfx;
  88.  
  89. END FishStart.
  90.  
  91.